package com.shycloud.mido.task.controller;

import com.shycloud.mido.common.core.util.R;
import com.shycloud.mido.task.service.SmMemberTaskCompleteService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * vip 任务完成模块 controller
 *
 * @author nianhua.jiang
 * @date 2020/8/27 11:21
 **/
@RestController
@AllArgsConstructor
@RequestMapping("/task/complate")
public class TaskComplateController {

	/** 任务完成模块 service */
	private SmMemberTaskCompleteService taskCompleteService;

	/**
	 * 完成任务 - 领取奖励
	 *
	 * @param taskId 任务ID
	 * @return
	 * @author nianhua.jiang
	 * @date 2021/1/11 14:55
	 **/
	@GetMapping("/receiveAward")
	@ApiOperation("领取活动奖励")
	@ApiImplicitParam(name = "taskId", value = "任务ID,活动页面传返回值,播放器分享界面传固定值-4", paramType = "query", dataType = "int")
	public R receiveAward(Integer taskId, String memberId, String excStr) {
		return new R(taskCompleteService.receiveAward(taskId, memberId, excStr));
	}

}
